package edu.dublbo.app.habitplusfavorite.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 资源类别
 * </p>
 *
 * @author habitplus
 * @since 2021-11-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_resource_catalog")
public class ResourceCatalog implements Serializable {

    private static final long serialVersionUID = -6452520908212910138L;
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 类别名称
     */
    private String name;

    /**
     * 图标
     */
    private String icon;

    /**
     * 父级类别
     */
    private Integer parentId;

    /**
     * 是否为目录（1：是，2：否）
     */
    private Integer dirFlag;

    @TableField(exist = false)
    private List<ResourceCatalog> children;

}
